<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <title>健康资讯详情</title>

    <link rel="stylesheet" href="../css/page-health-informationDetail.css" />
	<link rel="stylesheet" href="../plugins/elementui/index.css" />
	<script src="../plugins/jquery/dist/jquery.min.js"></script>
	<script src="../plugins/healthmobile.js"></script>
	<script src="../plugins/vue/vue.js"></script>
	<script src="../plugins/vue/axios-0.18.0.js"></script>
	<script src="../plugins/elementui/index.js"></script>
	
	<!-- Ueditor编辑器CSS -->
	<link href="../ue/umeditor.min.css" type="text/css" rel="stylesheet">
	<!-- Ueditor编辑器JS -->
	<script type="text/javascript" charset="utf-8" src="../ue/umeditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="../ue/umeditor.min.js"></script>
	<script type="text/javascript" src="../ue/lang/zh-cn.js"></script>

	
	<script>
	    var id = getUrlParam("id");//根据请求URL中的参数名称获取对应的值
		
	</script>
	
</head>

<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
    <div class="app"id="app">
        <!-- 页面头部 -->
        <div class="top-header">
            <span class="f-left"><i class="icon-back"></i>返回</span>
            <span class="center">阿拉尔幼儿接种系统</span>
            <span class="f-right"><i class="icon-more"></i></span>
        </div>
        <!-- 页面内容 -->
        <div class="contentBox">
            <div class="article">
                <h2 class="title">{{note.cn_note_title}}</h2>
                <h5 class="subtitle">{{note.cn_note_last_modify_time}}</h5>
                <!-- <div class="box">
                    <p>一眨眼，春节就这么过去了。</p>
                    <p>一去不复返的假期。</p>
                    <p>留下的却是一身无处安放的赘肉。</p>
                    <img src="../img/widget-info02.png" width="100%" />
                    <p>节后第一周，不仅要“收心”，还要“收胃”。</p>
                    <p>节日期间的大鱼大肉</p>
                    <p>给肠胃增加了不少负担，</p>
                    <p>醒脑提神，用茉莉花茶</p>
                    <p>假期中作息不规律，刚开始上班，许多人都觉得头昏脑涨，提不起精神。茉莉花茶可以醒脑提神，下午昏昏欲睡时喝一杯可以提神醒脑。</p>
                    <img src="../img/widget-info01.png" width="100%" />
                    <p>茉莉花茶对安抚情绪也很有益。在花茶中加点茯苓，安神助眠的效果会更好。如果心慌乏力、心累的感觉，还可以在花茶中加一点干桂圆肉。</p>
                </div> -->
				<div class="box">
					<!-- <textarea id="editor"  name="content" >{{note.cn_note_body}} </textarea> -->
					

					<script type="text/plain" id="editor" style="width:100%;height:400px;">

					</script>
					
				</div>
            </div>
        </div>
    </div>
    <!-- 页面 css js -->
    <!-- <script src="health-index.js"></script> -->


</body>

<script>
		var vue = new Vue({
			el:'#app',
			data:{
				note:{}
			},
			created() {
			    //发送ajax请求，获取所有的文章，赋值给note模型数据，用于页面展示
			    axios.post("/note/findByNoteId.do?noteId="+id).then((res) => {
			      if(res.data.flag){
			    	  //查询成功，给模型数据赋值
					  console.log(res.data.data.data);
					  console.log(res.data.data.data.cn_note_body);
			    	  this.note = res.data.data.data;
					  var um = UM.getEditor('editor',{
							toolbar:[],
							initialContent: '初始化内容',//初始化编辑器的内容
							initialFrameHeight: 200,
							// serverUrl: '/server/ueditor/controller.php',
							//关闭字数统计
							wordCount:false,
							readonly : true,
							elementPathEnabled :false,
							initialFrameWidth:'100%',
							initialFrameHeight:660,
							scaleEnabled:false,
							autoHeightEnabled: false
						});
					  um.setContent(res.data.data.data.cn_note_body);
					  
			      }else{
			    	  //查询失败，弹出提示信息
			    	  this.$message.error(res.data.message);
			      }
			    });				
			},
			
			methods:{
				
				//权限不足提示
				showMessage(r){
				  if(r == 'Error: Request failed with status code 403'){
				    //权限不足
				    this.$message.error('无访问权限');
				    return;
				  }else{
				    this.$message.error('未知错误');
				    return;
				  }
				}	
				
			}
		})
	</script>
	
</html>